import 'package:flutter/material.dart';

class HomeTabModel with ChangeNotifier {
  List<TabBean> _list = [];

  void request() async {
    await Future.delayed(
      Duration(seconds: 1),
      () {
        for (int i = 0; i < 10; i++) {
          TabBean tabBean = TabBean(i, "测试$i");
          _list.add(tabBean);
        }
      },
    );
    notifyListeners();
  }

  // 获取数据的方法
  List<TabBean> get tabList => _list;
}

class TabBean {
  int id;
  String title;
  TabBean(this.id, this.title);
}
